package com.example.secondhandsysapi.Service;

import com.example.secondhandsysapi.Mapper.CollectMapper;
import com.example.secondhandsysapi.Vo.CollectionDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectServiceImpl implements CollectService {

    @Autowired
    private CollectMapper collectMapper;

    @Override
    public Integer getCollects(Integer user_id, Integer goods_id) {
        Integer i = collectMapper.getCollects(user_id, goods_id);
        return 1;
    }

    @Override
    public List<CollectionDetails> getCollectionInfoByName(Integer user_id, String goods_name) {
        return collectMapper.getCollectionInfoByName(user_id,goods_name);
    }

    @Override
    public List<CollectionDetails> getCollectionInfo(Integer user_id) {
        return collectMapper.getCollectionInfo(user_id);
    }


}
